<?php
include "config.php";
include "services.php";

if (isset($_POST['submit_url']))  {
  echo "<h1>Services</h1>";
  if (isset($_POST['service']) && is_array($_POST['service'])) {
    foreach ($_POST['service'] as $service) {
      if ($service == "webcitation") {
        echo "<h3>Webcitation</h3>";
        echo get_webcitation($_POST['url'], $webcite_email);
      }
      if ($service == "tinyurl") {
        echo "<h3>Tinyurl</h3>";
        echo get_tinyurl($_POST['url']);
      }
      if ($service == "hugeurl_wiggy") {
        echo "<h3>Hugeurl (md5)</h3>";
        echo get_hugeurl_wiggy($_POST['url']);
      }
      if ($service == "hugeurl") {
        echo "<h3>Hugeurl</h3>";
        echo get_hugeurl($_POST['url']);
      }
    }
  }
}


?>